
<!-- Toolbar -->
<mat-toolbar color = "primary">
  <mat-toolbar-row>
    <span [routerLink]="'/index'">Pokemon System</span>
    <button mat-button [routerLink]="'/index'">Field</button>
    <button mat-button [routerLink]="'/tset'">Home</button>
    <button mat-button [routerLink]="'/user'" *ngIf="user.username">welcome,{{user.username}}</button>
    <button mat-button [routerLink]="'/login'" *ngIf="!user.username">Login</button>
    <button mat-button [routerLink]="'/register'" *ngIf="!user.username">Register</button>
    <button mat-button (click)="logoutConfirm()" *ngIf="user.username">Logout</button>

    <form class="navbar-form navbar-left" role="search" >
      <div class="form-group">
          <select class="form-control" name="stype" id="stype" [(ngModel)]=stype>
              <option value="Id">ID</option>
              <option value="Name">Name</option>
              <option value="Type">Type</option>
              <option value="Abilities">Abilities</option>
            </select>
      </div>
      <div class="form-group">
          <input type="text" class="form-control" name="wd" [(ngModel)]=wd />
      </div>
      <button type="submit"   [routerLink]="['/search']" [queryParams]="{wd: wd,stype:stype }" class="btn btn-default">Search</button>
  </form>

  </mat-toolbar-row>
</mat-toolbar>


<router-outlet></router-outlet>
